import { hashFunc, HashTable, isPrime } from "./hash_table.js";
// console.log(hashFunc('name', 10));
// console.log(hashFunc('abc', 10));
// console.log(hashFunc('cba', 10));
// console.log(hashFunc('npc', 10));
// console.log(hashFunc('mba', 10));
const hashTable = new HashTable();
// hashTable.put('name', 'zs');
// hashTable.put('age', '18');
// hashTable.put('height', '1.88');
// hashTable.put('address', 'China');
// hashTable.put('age', '20');
// console.log(hashTable.storage);

// console.log(hashTable.get('abc'));
// console.log(hashTable.get('age'));
// console.log(hashTable.get('address'));

// console.log(hashTable.remove('abc'));
// console.log(hashTable.remove('age'));
// console.log(hashTable.storage);

// console.log(hashTable.isEmpty());
// console.log(hashTable.size());
// console.log(hashTable);
// console.log(hashTable.storage);


hashTable.put('aaa', '111')
hashTable.put('bbb', '111')
hashTable.put('ccc', '111')
hashTable.put('ddd', '111')
hashTable.put('eee', '111')
hashTable.put('fff', '111')
console.log(hashTable.count);
console.log(hashTable.storage);
hashTable.put('mmm', '111')
console.log(hashTable.count);
console.log(hashTable.storage);

// console.log(4, isPrime(4));
// console.log(9, isPrime(9));
// console.log(11, isPrime(11));
// console.log(16, isPrime(16));
// console.log(25, isPrime(25));
// console.log(49, isPrime(49));
// console.log(81, isPrime(81));
// console.log(111, isPrime(111));